Transparently Reconciling Transactions with Locking for Java Synchronization

نویسندگان

  • Adam Welc
  • Antony L. Hosking
  • Suresh Jagannathan
چکیده

Concurrent data accesses in high-level languages like Java and C# are typically mediated using mutual-exclusion locks. Threads use locks to guard the operations performed while the lock is held, so that the lock’s guarded operations can never be interleaved with operations of other threads that are guarded by the same lock. This way both atomicity and isolation properties of a thread’s guarded operations are enforced. Recent proposals recognize that these properties can also be enforced by concurrency control protocols that avoid well-known problems associated with locking, by transplanting notions of transactions found in database systems to a programming language context. While higher-level than locks, software transactions incur significant implementation overhead. This overhead cannot be easily masked when there is little contention on the operations being guarded. We show how mutual-exclusion locks and transactions can be reconciled transparently within Java’s monitor abstraction. We have implemented monitors for Java that execute using locks when contention is low and switch over to transactions when concurrent attempts to enter the monitor are detected. We formally argue the correctness of our solution with respect to Java’s execution semantics and provide a detailed performance evaluation for different workloads and varying levels of contention. We demonstrate that our implementation has low overheads in the uncontended case (7% on average) and that significant performance improvements (up to 3×) can be achieved from running contended monitors trans-

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

ByteSTM: Java Software Transactional Memory at the Virtual Machine Level

(ABSTRACT) As chip vendors are increasingly manufacturing a new generation of multi-processor chips called multicores, improving software performance requires exposing greater concurrency in software. Since code that must be run sequentially is often due to the need for synchronization , the synchronization abstraction has a significant effect on program performance. Lock-based synchronization ...

متن کامل

JPMT: A Java Performance Monitoring Tool

This paper describes our Java Performance Monitoring Toolkit (JPMT), which is developed for detailed analysis of the behavior and performance of Java applications. JPMT represents internal execution behavior of Java applications by event traces, where each event represents the occurrence of some activity, such as thread creation, method invocation, and locking contention. JPMT supports event fi...

متن کامل

Special Issue on Java Technologies for Real-Time and Embedded Systems JTRES2013

The first paper [2] discusses software locking mechanisms that commonly protect shared resources for multi-threaded applications. This mechanism can, especially in chip-multiprocessor systems, result in a large synchronization overhead. For real-time systems in particular, this overhead increases the worstcase execution time and may void a task set's schedulability. This paper presents two hard...

متن کامل

Eecient Support for Customizing Concurrency Control in Persistent Java

We report on the issues raised when designing a customizable locking mechanism for Persistent Java, a type-safe, object-oriented, orthogonally persistent system based on the language Java. Customizable locking mechanisms are supported by locking capabilities. A locking capability is a book-keeper of locks that automatically acquires locks with a customizable connict detection mechanism. It impl...

متن کامل

— Syllabus — Software Transactional Memory

“Transactional memory” means that, instead of using explicit locks to protect from data races (like the Java synchronized construct), a programmer could declare a block of code atomic and rely on the underlying software and hardware system to ensure that code within the block executes as if atomic. The transactional memory system might use any of several concurrency control protocols, with some...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006